package com.zryc.shop.ums.mapper;

import com.zryc.shop.ums.entity.Admin;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zryc.shop.ums.entity.Menu;
import com.zryc.shop.ums.entity.Role;
import feign.Param;

import java.util.List;

/**
 * <p>
 * 后台用户表 Mapper 接口
 * </p>
 *
 * @author zhaozhao
 * @since 2024-01-16
 */
public interface AdminMapper extends BaseMapper<Admin> {

    /**
     * 根据用户id查询所有菜单列表
     *
     * @param adminId
     * @return
     */
    List<Menu> getAllMenuByAdminId(Long adminId);

    /**
     * 删除在用户角色中间表中的用户
     * @param id
     */
    void deleteAdminFromMiddle(@Param("adminId") Long id);
}
